package diploma.kisel.modelas.service;

public class StaticHelper {
	
	public static String nullToEmptyString(String string) {
		if (string==null)
			string="";
		return string;
	}
	
	public static String [] getWords(String text, String separator) {
		text = text.trim();
		String [] result = text.split(separator);
		for (int i=0; i<result.length; i++)
			result[i]=result[i].trim();
		return result;
	}
	
	public static String getExtension(String filename) {
		String array [] = filename.split("\\.");
		return array[array.length-1];
	}

}
